package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.admin.WorkspaceService;
import com.sky.vo.DishOverViewVO;
import com.sky.vo.DishViewVO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/workspace")
@RequiredArgsConstructor
public class WorkspaceController {
    private final WorkspaceService workspaceService;

    /*
    * 工作台今日数据查询
    * 没有头绪，不知道查询那张数据库表，
    * 或者说通过哪张数据库表来进行查询
    * */
    @GetMapping("/businessData")
    public Result getBusinessData(){

        return Result.success();
    }

    /*
    *查询菜品总览
    * */
    @GetMapping("/overviewDishes")
    public Result selectDishes(){
       DishOverViewVO dish= workspaceService.selectDishes();
        return Result.success(dish);
    }
}
